package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcParentsFeedback;
import com.visizen.wisdomclass.server.model.WcParentsFeedbackExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcParentsFeedbackMapper {
    @SelectProvider(type=WcParentsFeedbackSqlProvider.class, method="countByExample")
    int countByExample(WcParentsFeedbackExample example);

    @DeleteProvider(type=WcParentsFeedbackSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcParentsFeedbackExample example);

    @Delete({
        "delete from wc_parents_feedback",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long ID);

    @Insert({
        "insert into wc_parents_feedback (ID, HOME_ID, ",
        "USER_ID, CONTENT)",
        "values (#{ID,jdbcType=BIGINT}, #{HOME_ID,jdbcType=BIGINT}, ",
        "#{USER_ID,jdbcType=BIGINT}, #{CONTENT,jdbcType=VARCHAR})"
    })
    int insert(WcParentsFeedback record);

    @InsertProvider(type=WcParentsFeedbackSqlProvider.class, method="insertSelective")
    int insertSelective(WcParentsFeedback record);

    @SelectProvider(type=WcParentsFeedbackSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="HOME_ID", property="HOME_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="USER_ID", property="USER_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="CONTENT", property="CONTENT", jdbcType=JdbcType.VARCHAR)
    })
    List<WcParentsFeedback> selectByExample(WcParentsFeedbackExample example);

    @Select({
        "select",
        "ID, HOME_ID, USER_ID, CONTENT",
        "from wc_parents_feedback",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="HOME_ID", property="HOME_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="USER_ID", property="USER_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="CONTENT", property="CONTENT", jdbcType=JdbcType.VARCHAR)
    })
    WcParentsFeedback selectByPrimaryKey(Long ID);

    @UpdateProvider(type=WcParentsFeedbackSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcParentsFeedback record, @Param("example") WcParentsFeedbackExample example);

    @UpdateProvider(type=WcParentsFeedbackSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcParentsFeedback record, @Param("example") WcParentsFeedbackExample example);

    @UpdateProvider(type=WcParentsFeedbackSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcParentsFeedback record);

    @Update({
        "update wc_parents_feedback",
        "set HOME_ID = #{HOME_ID,jdbcType=BIGINT},",
          "USER_ID = #{USER_ID,jdbcType=BIGINT},",
          "CONTENT = #{CONTENT,jdbcType=VARCHAR}",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcParentsFeedback record);
}